import os,sys

def macch(addr):
        comm='sudo ifconfig eth0 down && ifconfig eth0 hw ether '+ addr + ' && sudo ifconfig eth0 up'
        os.system(comm)

if __name__ == "__main__":
        try:
           arg = sys.argv[1]
           if arg == '-w':
                macch('00:1E:C9:45:E5:74')
           elif arg == '-h':
                macch('00:1E:45:45:45:45')
        except:
          print "Error, enter correct argument or type -help"
